package cn.tedu.controller;

import cn.tedu.service.EmployeeService;
import cn.tedu.vo.SysResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/emp/")
public class EmployeeController {
    @Autowired
    private EmployeeService employeeService;

    @RequestMapping("countWork/{time}/{id}") // $.ajax("/emp/countWork/{time}",function (data) {
    public SysResult countWork(@PathVariable String time, @PathVariable Integer id){
        return SysResult.success(employeeService.countWork(time,id));
    }
}
